home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
tcp
/
AmiTCPsdk_40.lha
/
AmiTCP-4.0
/
netinclude
/
fcntl.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-10-03
|
2KB
|
81 lines
#ifndef FCNTL_H
#define FCNTL_H \
"$Id: fcntl.h,v 4.2 1994/10/03 20:52:20 ppessi Exp $"
/*
* fcntl.h using AmigaOS 2.04 dos.library
*
* Copyright © 1994 AmiTCP/IP Group,
* Network Solutions Development, Inc.
* All rights reserved.
*/
#ifndef USE_DOSIO
#include <include:fcntl.h>
#else
#if __SASC
#ifndef PROTO_DOS_H
#include <proto/dos.h>
#endif
#elif __GNUC__
#ifndef _INLINE_DOS_H
#include <inline/dos.h>
#endif
#else
#ifndef CLIB_DOS_PROTOS_H
#include <clib/dos_protos.h>
#endif
#endif
#ifndef DOS_DOS_H
#include <dos/dos.h>
#endif
extern BPTR __dosio_files[3]; /* defined in dosio_init.c, autoinitialized */
/*
* level 1 IO is supported for stdio/stdout/stderr only
*/
#ifndef _COMMIFMT_H
#include <sys/commifmt.h>
#endif
#if 0 /* not supported */
extern int open (const char *, int, ...);
extern int creat (const char *, int);
#endif
#define read(fd, buf, len) \
(((unsigned)(fd) < 3) ? Read(__dosio_files[(fd)], (buf), (len)) : -1)
#define write(fd, buf, len) \
(((unsigned)(fd) < 3) ? Write(__dosio_files[(fd)], (buf), (len)) : -1)
#define lseek(fd, pos, mode) \
(((unsigned)(fd) < 3) ? Seek(__dosio_files[(fd)], (pos), (mode)-1) : -1)
#define tell(x) lseek(x, 0L, 1)
#if 0 /* stdin, stdout, stderr should not be closed */
extern int close (int);
#endif
#define unlink(name) !DeleteFile((STRPTR)(name))
#if 0 /* SAS/C iomode() not supported */
extern int iomode (int, int);
#endif
#define isatty(fd) \
(((unsigned)(fd) < 3) ? IsInteractive(__dosio_files[(fd)]) & 0x1 : 0)
#ifndef _COMMNULL_H
#include <sys/commnull.h>
#endif
#endif /* USE_DOSIO */
#endif /* FCNTL_H */